package com.fzrskj.cloud.free.user.utils;

import com.fzrskj.cloud.free.user.bean.UserTask;
import com.fzrskj.cloud.free.user.dao.UserTaskDao;
import ms.core.object.CObject;

import java.util.Map;

public class UserTaskUtils extends CObject{
	/**
	 * 添加数据
	 * @param obj
	 * @return
	 */
	public int addUserTask(UserTask obj){
		UserTaskDao dao= new UserTaskDao();
		int ret = dao.addUserTask(obj);
		this.setErrCode(dao.getErrCode());
		dao.dispose();
		return ret;
	}

	/**
	 * 查询到期任务是否已发送
	 * @param cdt
	 * @return
	 */
	public UserTask queryEndTime(Map<String, Object> cdt){
		UserTaskDao dao= new UserTaskDao();
		UserTask ut = dao.queryEndTime(cdt);
		this.setErrCode(dao.getErrCode());
		dao.dispose();
		return ut;	
	}	
}